package org.rabbit.mq.springbootrabbitconsumer;

import com.rabbitmq.client.Channel;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import java.io.IOException;

/**
 * @Author: zhs
 * @Date: 2021/6/15 14:48
 * @Description:
 */

/**
 * 死信队列
 *
 */
@Component
public class DLXListener {

    @RabbitListener( queues = "dlx_queue")
    public void listenerQueue(Message message, Channel channel) throws IOException {
        System.err.println(message);
    }


}
